﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BA2009.Entities;

namespace BA2009.Data.Filters
{
    public static class EntityFilters
    {
        public static IQueryable<Banner> WithID(this IQueryable<Banner> qry, int id)
        {
            return from b in qry
                   where b.BannerID == id
                   select b;
        }

        public static IQueryable<Resource> ResourceFilterById( this IQueryable<Resource> query, int id )
        {
             return from res in query
                    where res.ResourceID== id
                    select res;
        }
    }
}
